<?php

namespace app\admin\controller;

use app\BaseController;

class Base extends BaseController
{
    protected $uid;
    public function __construct()
    {
        parent::__construct();
        if (!@$_SESSION['admin']['username']) {
            exit("<script>alert('请登录后再来操作');location.href='?p=admin&c=login&a=index';</script>");
        }
        $this->uid = $_SESSION['admin']['id'];
    }
}
